<template>
  <div class="common-mobile-view">
    <moment-list />

    <el-button type="primary" circle :icon="Refresh"
               class="refresh-button" @click="foodStore.queryMomentList()"/>
  </div>
</template>

<script setup lang="ts">
import MomentList from '@/components/Moment/MomentList.vue'
import { Refresh } from '@element-plus/icons-vue'
import { useFoodStore } from '@/store/food'
import { onMounted } from 'vue'

const foodStore = useFoodStore()

onMounted(async () => {
  await foodStore.queryMomentList()
})
</script>

<style lang="scss">
.refresh-button {
  position: fixed;
  top: 60px;
  right: 20px;
}
</style>
